package com.alibaba.cloud.clinic.config.mq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.ReturnedMessage;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
public class RabbitMqReturnsCallBack implements RabbitTemplate.ReturnsCallback {

    private static final Logger LOGGER = LoggerFactory.getLogger(RabbitMqReturnsCallBack.class);

    @Override
    public void returnedMessage(ReturnedMessage returned) {
        LOGGER.info("消息未路由到队列：", returned.toString());
    }
}
